class Solution:
    def convertToTitle(self, n: int) -> str:
        s = ""
        while n > 0:
            n = n - 1
            if n == 0:
                s = "A" + s
                break
            k = n % 26 + 65
            s = chr(k) + s
            n = n // 26
        return s


if __name__ == '__main__':
    so = Solution()
    s = 701
    r = so.convertToTitle(s)
    print(r)
